package com.gof.example.facade;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/7 10:44.
 * haiming.fei@tongdun.cn
 */
public class ModFacade extends AbstractFacade {

    private NewEncryption encryption;
    private OpFile opFile;

    public ModFacade() {
        encryption = new NewEncryption();
        opFile = new OpFile();
    }

    @Override
    void enc() {
        String s = opFile.read("1.txt");
        String encStr = encryption.modEncrypt(s);
        opFile.save("2.txt", encStr);
    }
}
